package ca.camosun.chatbox.message;

import ca.camosun.chatbox.profile.Profile;

public class Message {
	private final String content;
	private final Profile sender;
	
	public Message(Profile theSender, String theContent) {
		sender = theSender;
		content = theContent;
	}
	
	public String getContent() {
		return content;
	}

	public Profile getSender() {
		return sender;
	}

	@Override
	public boolean equals(Object o) {
		Message other = (Message) o;
		
		if (!content.equals(other.content)) {
			return false;
		}
		
		return sender.equals(other.sender);
	}
}
